﻿using System;
using System.Collections.Generic;
using System.Collections;

namespace SortOf
{
    public class Dictionary<T> : DictionaryBase
    {
        public Dictionary()
        {
        }

        public void Add(int a, T b)
        {
            if (base.InnerHashtable[a] == null)
            {
                base.InnerHashtable.Add(a, b);
            }
            else
            {
                Console.WriteLine("This item already exists.");
            }
        }

        public String Item(int a)
        {
            if (base.InnerHashtable[a] != null)
            {
                return base.InnerHashtable[a].ToString();
            }
            else
            {
                return "This item does not exist.";
            }
        }

        public void Remove(int a)
        {
            if (base.InnerHashtable[a] != null)
            {
                base.InnerHashtable.Remove(a);
            }
            else
            {
                Console.WriteLine("This item does not exist.");
            }
        }
    }
}
